<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Easy
  </div>
  <div>
   <h1 class="question_title">
    669. Trim a Binary Search Tree
   </h1>
   <p>
    Given a binary search tree and the lowest and highest boundaries as
    <code>
     L
    </code>
    and
    <code>
     R
    </code>
    , trim the tree so that all its elements lies in
    <code>
     [L, R]
    </code>
    (R &gt;= L). You might need to change the root of the tree, so the result should return the new root of the trimmed binary search tree.
   </p>
   <p>
    <b>
     Example 1:
    </b>
    <br>
   </p>
   <pre>
<b>Input:</b> 
    1
   / \
  0   2

  L = 1
  R = 2

<b>Output:</b> 
    1
      \
       2
</pre>
   <p>
    <b>
     Example 2:
    </b>
    <br>
   </p>
   <pre>
<b>Input:</b> 
    3
   / \
  0   4
   \
    2
   /
  1

  L = 1
  R = 3

<b>Output:</b> 
      3
     / 
   2   
  /
 1
</pre>
  </div>
  <div>
   <h1 class="question_title">
    669. 修剪二叉搜索树
   </h1>
   <p>
    给定一个二叉搜索树，同时给定最小边界
    <code>
     L
    </code>
    &nbsp;和最大边界&nbsp;
    <code>
     R
    </code>
    。通过修剪二叉搜索树，使得所有节点的值在
    <code>
     [L, R]
    </code>
    中 (R&gt;=L) 。你可能需要改变树的根节点，所以结果应当返回修剪好的二叉搜索树的新的根节点。
   </p>
   <p>
    <strong>
     示例 1:
    </strong>
   </p>
   <pre>
<strong>输入:</strong> 
    1
   / \
  0   2

  L = 1
  R = 2

<strong>输出:</strong> 
    1
      \
       2
</pre>
   <p>
    <strong>
     示例 2:
    </strong>
   </p>
   <pre>
<strong>输入:</strong> 
    3
   / \
  0   4
   \
    2
   /
  1

  L = 1
  R = 3

<strong>输出:</strong> 
      3
     / 
   2   
  /
 1
</pre>
  </div>
 </body>
</html>